package tech.aistar.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.aistar.entity.Tenant;
import tech.aistar.mapper.TenantMapper;
import tech.aistar.service.ITenantService;

@Service
public class TenantServiceImpl implements ITenantService {

    @Autowired
    private TenantMapper tenantMapper;
    @Override
    public Tenant selectById(Integer id) {

        return tenantMapper.selectById(id);
    }

    @Override
    public void insertTenant(Integer registerId, String identity) {
        tenantMapper.insertTenant(registerId,identity);
    }


    @Override
    public int updateById(String phone,Integer id) {
        return tenantMapper.updateById(phone,id);
    }

    @Override
    public int updateNameById(String name, Integer id) {
        return tenantMapper.updateNameById(name,id);
    }

    @Override
    public int updategenderById(String gender, Integer id) {
        return tenantMapper.updategenderById(gender,id);
    }

    @Override
    public int updateIdentityById(String identityCardNumber,Integer id) {
        return tenantMapper.updateIdentityById(identityCardNumber,id);
    }

    @Override
    public Tenant selectByregisterId(Integer registerId) {
        return tenantMapper.selectByregisterId(registerId);
    }
}
